package com.ozo.cloud.common.log.properties;

import java.util.Arrays;
import java.util.List;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 日志记录配置
 *
 * @author qiangesoft
 * @date 2024-04-11
 */
@Data
@ConfigurationProperties(LogProperties.PREFIX)
public class LogProperties {

    public static final String PREFIX = "ozo.log";

    /**
     * 日志开启
     */
    private boolean enabled = true;

    /**
     * 记录请求参数
     */
    private boolean saveParam = true;

    /**
     * 记录响应数据
     */
    private boolean saveReturn = true;

    /**
     * 排除字段
     * <p>例如一些铭感词字段，密码手机号码等</p>
     */
    private List<String> excludeFields = Arrays.asList("password", "mobile", "idcard", "phone");

}
